from django.shortcuts import render
from django.db import connection


def index(request):
    cursor = connection.cursor()
    # cursor.execute("INSERT INTO user(id, name, age) VALUES ('3', '书', '33')")
    cursor.execute("select * from user")
    result = cursor.fetchall()
    context = {
        "result": result
    }
    return render(request, "index.html", context=context)
